<template>
    <div>
        <el-table :data="data" style="width: 100%" border>
            <el-table-column prop="title" label="标题">
            </el-table-column>
            <el-table-column prop="s_key" label="主键">
            </el-table-column>
            <el-table-column prop="s_value" label="值">
            </el-table-column>
            <el-table-column prop="type" label="type">
            </el-table-column>
            <el-table-column prop="sort" label="排序">
            </el-table-column>
            <el-table-column align="center" label="操作" width="300">
                <template slot-scope="{ row }">
                    <el-button type="info" @click="edit(row)">修改</el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-dialog title="修改" :visible.sync="isDialog">
            <el-form ref="form" :model="form" label-width="80px">
                <el-row type="flex" :gutter="10">
                    <el-col :span="12">
                        <el-form-item label="题目名称" prop="name">
                            <el-input v-model="form.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row type="flex" justify="center">
                    <el-button type="primary" @click="initiate()">修改</el-button>
                    <el-button @click="formReset()">重置</el-button>
                </el-row>
            </el-form>
        </el-dialog>
    </div>
</template>

<script>
import { post } from "@/assets/js/http.js"
export default {
    data() {
        return {
            data: [],
            isDialog: false,
            form: {

            }
        }
    },
    methods: {
        getInfo() {
            post({
                url: "/admin/answer.Basic/index",
                loading: true
            }).then(res => {
                this.data = res
            })
        },
        edit(row) {

        }
    },
    computed: {
        comType() {
            return (item) => {
                switch (item) {
                    case 1:

                }
            }
        }
    },
    mounted() {
        this.getInfo()
    }
}
</script>

<style></style>